<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .top{border-bottom:solid black 1px; display:inline-block; float:left}
        .bottom{ display:inline-block; clear:left; float:left}


        span.frac {
            display: inline-block;
            text-align: center;
            vertical-align: middle;
        }
        span.frac > sup, span.frac > sub {
            display: block;
            font: inherit;
            padding: 0 0.3em;
        }
        span.frac > sup {border-bottom: 0.08em solid;}
        span.frac > span {display: none;}
    </style>
</head>
<body>
<div>1</div><div style="border-top:1px solid black;">3</div>
<hr/>
<sup>6</sup>/<sub>7</sub>​
<hr/>
<div style="padding-left:20px;">
    <div class="top">2</div><div class="bottom">6</div>​
</div>
<hr/>
<hr/>
<p>7&nbsp;<span class="frac"><sup>42</sup><span>&frasl;</span><sub>73</sub></span></p>
<p>7&nbsp;<span class="frac"><sup>42</sup><span>&frasl;</span><sub>73</sub></span></p>
</body>
</html>
